home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / asmwiz10.arc / ASMWIZ.MAN < prev    next >
Text File  |  1990-04-06  |  71KB  |  2,601 lines

  1. Service : BC_ASC2INT
  2.  
  3. Module  : Base Conversion Services
  4.  
  5. Compat  : Any
  6.  
  7. Purpose : Converts an ASCIIZ string to an unsigned integer
  8.  
  9. Parms:
  10.       BL <-- base from which to convert (2-36)
  11.    DS:SI <-- pointer to string
  12.    -------
  13.       AX = unsigned integer (0-65,535)
  14.  
  15. Description:
  16.  
  17. The BC_ASC2INT service converts an ASCIIZ string to an unsigned integer
  18. value.  The conversion stops at the first character which cannot be construed
  19. as being part of the number.
  20.  
  21. Any reasonable base may be specified, giving this service considerable
  22. flexibility.  More commonly-used bases include:
  23.  
  24.      2     binary
  25.      8     octal
  26.     10     decimal
  27.     16     hex
  28.  
  29.  
  30.  
  31.  
  32. Service : BC_ASC2LONG
  33.  
  34. Module  : Base Conversion Services
  35.  
  36. Compat  : Any
  37.  
  38. Purpose : Converts an ASCIIZ string to an unsigned long integer
  39.  
  40. Parms:
  41.       BL <-- base from which to convert (2-36)
  42.    DS:SI <-- pointer to string
  43.    -------
  44.    DX,AX = unsigned long integer (0-4,294,967,295)
  45.  
  46. Description:
  47.  
  48. The BC_ASC2LONG service converts an ASCIIZ string to an unsigned long integer
  49. value.  The conversion stops at the first character which cannot be construed
  50. as being part of the number.
  51.  
  52. Any reasonable base may be specified, giving this service considerable
  53. flexibility.  More commonly-used bases include:
  54.  
  55.      2     binary
  56.      8     octal
  57.     10     decimal
  58.     16     hex
  59.  
  60. Service : BC_ASC2SINT
  61.  
  62. Module  : Base Conversion Services
  63.  
  64. Compat  : Any
  65.  
  66. Purpose : Converts an ASCIIZ string to a signed integer
  67.  
  68. Parms:
  69.       BL <-- base from which to convert (2-36)
  70.    DS:SI <-- pointer to string
  71.    -------
  72.       AX = unsigned integer (-32768 to 32767)
  73.  
  74. Description:
  75.  
  76. The BC_ASC2SINT service converts an ASCIIZ string to a signed integer value.
  77. The conversion stops at the first character which cannot be construed as
  78. being part of the number.
  79.  
  80. Any reasonable base may be specified, giving this service considerable
  81. flexibility.  More commonly-used bases include:
  82.  
  83.      2     binary
  84.      8     octal
  85.     10     decimal
  86.     16     hex
  87.  
  88. Note that negative numbers are frequently represented as unsigned numbers
  89. when a base other than 10 (decimal) is used.  If you wish to follow that
  90. convention, simply use BC_ASC2INT instead of this routine.
  91.  
  92. Service : BC_ASC2SLONG
  93.  
  94. Module  : Base Conversion Services
  95.  
  96. Compat  : Any
  97.  
  98. Purpose : Converts an ASCIIZ string to a signed long integer
  99.  
  100. Parms:
  101.       BL <-- base from which to convert (2-36)
  102.    DS:SI <-- pointer to string
  103.    -------
  104.    DX,AX = signed long integer (-2,147,483,648 to 2,147,483,647)
  105.  
  106. Description:
  107.  
  108. The BC_ASC2SLONG service converts an ASCIIZ string to a signed long integer
  109. value.  The conversion stops at the first character which cannot be construed
  110. as being part of the number.
  111.  
  112. Any reasonable base may be specified, giving this service considerable
  113. flexibility.  More commonly-used bases include:
  114.  
  115.      2     binary
  116.      8     octal
  117.     10     decimal
  118.     16     hex
  119.  
  120. Note that negative numbers are frequently represented as unsigned numbers
  121. when a base other than 10 (decimal) is used.  If you wish to follow that
  122. convention, simply use BC_ASC2LONG instead of this routine.
  123.  
  124. Service : BC_INT2ASC
  125.  
  126. Module  : Base Conversion Services
  127.  
  128. Compat  : Any
  129.  
  130. Purpose : Converts an unsigned integer to an ASCIIZ string
  131.  
  132. Parms:
  133.       AX <-- unsigned integer (0-65,535)
  134.       BL <-- desired base (2-36)
  135.    ES:DI <-- pointer to string buffer (recommend 17 bytes)
  136.  
  137. Description:
  138.  
  139. The BC_INT2ASC service converts an integer value to an ASCIIZ number of a
  140. specified base.  The integer is presumed to be unsigned, giving a range of
  141. 0-65,535.
  142.  
  143. More commonly-used bases include:
  144.  
  145.      2     binary
  146.      8     octal
  147.     10     decimal
  148.     16     hex
  149.  
  150.  
  151.  
  152.  
  153. Service : BC_LONG2ASC
  154.  
  155. Module  : Base Conversion Services
  156.  
  157. Compat  : Any
  158.  
  159. Purpose : Converts an unsigned long integer to an ASCIIZ string
  160.  
  161. Parms:
  162.    DX,AX <-- unsigned long integer (0-4,294,967,295)
  163.       BL <-- desired base (2-36)
  164.    ES:DI <-- pointer to string buffer (recommend 33 bytes)
  165.  
  166. Description:
  167.  
  168. The BC_LONG2ASC service converts an unsigned long integer value to an ASCIIZ
  169. number of a specified base.
  170.  
  171. More commonly-used bases include:
  172.  
  173.      2     binary
  174.      8     octal
  175.     10     decimal
  176.     16     hex
  177.  
  178. Service : BC_SINT2ASC
  179.  
  180. Module  : Base Conversion Services
  181.  
  182. Compat  : Any
  183.  
  184. Purpose : Converts a signed integer to an ASCIIZ string
  185.  
  186. Parms:
  187.       AX <-- signed integer (-32768 to 32767)
  188.       BL <-- desired base (2-36)
  189.    ES:DI <-- pointer to string buffer (recommend 18 bytes)
  190.  
  191. Description:
  192.  
  193. The BC_SINT2ASC service converts an integer value to an ASCIIZ number of a
  194. specified base.  The integer is presumed to be signed, giving a range of
  195. -32,768 to 32,767.
  196.  
  197. More commonly-used bases include:
  198.  
  199.      2     binary
  200.      8     octal
  201.     10     decimal
  202.     16     hex
  203.  
  204. Note that negative numbers are frequently represented as unsigned numbers
  205. when a base other than 10 (decimal) is used.  If you wish to follow that
  206. convention, simply use BC_INT2ASC instead of this routine.
  207.  
  208. Service : BC_SLONG2ASC
  209.  
  210. Module  : Base Conversion Services
  211.  
  212. Compat  : Any
  213.  
  214. Purpose : Converts a signed long integer to an ASCIIZ string
  215.  
  216. Parms:
  217.    DX,AX <-- signed long integer (-2,147,483,648 to 2,147,483,647)
  218.       BL <-- desired base (2-36)
  219.    ES:DI <-- pointer to string buffer (recommend 34 bytes)
  220.  
  221. Description:
  222.  
  223. The BC_SLONG2ASC service converts a signed long integer value to an ASCIIZ
  224. number of a specified base.
  225.  
  226. More commonly-used bases include:
  227.  
  228.      2     binary
  229.      8     octal
  230.     10     decimal
  231.     16     hex
  232.  
  233. Note that negative numbers are frequently represented as unsigned numbers
  234. when a base other than 10 (decimal) is used.  If you wish to follow that
  235. convention, simply use BC_LONG2ASC instead of this routine.
  236.  
  237. Service : BV_CHROUT
  238.  
  239. Module  : BIOS Video Services
  240.  
  241. Compat  : BIOS
  242.  
  243. Purpose : Displays a character on the screen
  244.  
  245. Parms:
  246.       AL <-- character to display
  247.  
  248. Description:
  249.  
  250. The BV_CHROUT routine displays a character on the screen.
  251.  
  252. The following control codes are interpreted:
  253.    7      Bell             beep
  254.    8      Backspace        non-destructive backspace
  255.    9      Tab              space over to the next tab stop
  256.   10      Linefeed         move cursor down one line, scrolling as needed
  257.   12      Formfeed         clear screen and home cursor
  258.   13      Carriage Return  home cursor on current line
  259.  
  260. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  261. keep the output from this service in a window.
  262.  
  263.  
  264.  
  265.  
  266. Service : BV_CLEOLN
  267.  
  268. Module  : BIOS Video Services
  269.  
  270. Compat  : BIOS
  271.  
  272. Purpose : Clears to the end of the line
  273.  
  274. Parms:
  275.    none
  276.  
  277. Description:
  278.  
  279. The BV_CLEOLN service clears from the current cursor position to the end of
  280. the current screen line, inclusive.
  281.  
  282. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  283. keep the output from this service in a window.
  284.  
  285. Service : BV_CLS
  286.  
  287. Module  : BIOS Video Services
  288.  
  289. Compat  : BIOS
  290.  
  291. Purpose : Clears the screen
  292.  
  293. Parms:
  294.    none
  295.  
  296. Description:
  297.  
  298. The BV_CLS service clears the screen and homes the cursor to the upper left
  299. corner.
  300.  
  301. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  302. keep the output from this service in a window.
  303.  
  304.  
  305.  
  306.  
  307. Service : BV_COLOR
  308.  
  309. Module  : BIOS Video Services
  310.  
  311. Compat  : BIOS
  312.  
  313. Purpose : Sets the default text color
  314.  
  315. Parms:
  316.       AL <-- default color
  317.  
  318. Description:
  319.  
  320. The BV_COLOR service sets the default text color.  A color/attribute table is
  321. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  322. high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
  323. is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
  324.  
  325. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  326. keep the output from this service in a window.
  327.  
  328. Service : BV_CRLF
  329.  
  330. Module  : BIOS Video Services
  331.  
  332. Compat  : BIOS
  333.  
  334. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  335.  
  336. Parms:
  337.    none
  338.  
  339. Description:
  340.  
  341. The BV_CRLF routine displays a carriage return and linefeed on the screen.
  342.  
  343. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  344. keep the output from this service in a window.
  345.  
  346.  
  347.  
  348.  
  349. Service : BV_DELLINE
  350.  
  351. Module  : BIOS Video Services
  352.  
  353. Compat  : BIOS
  354.  
  355. Purpose : Deletes the current screen row
  356.  
  357. Parms:
  358.    none
  359.  
  360. Description:
  361.  
  362. The BV_DELLINE service deletes the row on which the cursor is placed.  Any
  363. rows beneath it are moved up and the bottom line of the screen is cleared to
  364. a row of spaces in the current screen colors.
  365.  
  366. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  367. keep the output from this service in a window.
  368.  
  369. Service : BV_GETCOLOR
  370.  
  371. Module  : BIOS Video Services
  372.  
  373. Compat  : BIOS
  374.  
  375. Purpose : Gets the default text color
  376.  
  377. Parms:
  378.    -------
  379.       AL = default color
  380.  
  381. Description:
  382.  
  383. The BV_GETCOLOR service gets the default text color.  A color/attribute table
  384. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  385. the high nybble and ranges 0-7 in text modes, 0 in graphics modes; the
  386. foreground is in the low nybble and ranges 0-7 in text modes, 0-x in graphics
  387. modes.
  388.  
  389. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  390. keep the output from this service in a window.
  391.  
  392.  
  393.  
  394.  
  395. Service : BV_HIDECURSOR
  396.  
  397. Module  : BIOS Video Services
  398.  
  399. Compat  : BIOS
  400.  
  401. Purpose : Hides the cursor
  402.  
  403. Parms:
  404.    none
  405.  
  406. Description:
  407.  
  408. The BV_HIDECURSOR service hides the cursor, making it invisible.  This does
  409. not affect normal cursor operation.
  410.  
  411. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  412. keep the output from this service in a window.
  413.  
  414. Service : BV_INSLINE
  415.  
  416. Module  : BIOS Video Services
  417.  
  418. Compat  : BIOS
  419.  
  420. Purpose : Inserts a line at the current screen row
  421.  
  422. Parms:
  423.    none
  424.  
  425. Description:
  426.  
  427. The BV_INSLINE service inserts a row at the current cursor location.  Any
  428. rows beneath it are moved down and the new line screen is cleared to a row of
  429. spaces in the current screen colors.
  430.  
  431. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  432. keep the output from this service in a window.
  433.  
  434.  
  435.  
  436.  
  437. Service : BV_LOCATE
  438.  
  439. Module  : BIOS Video Services
  440.  
  441. Compat  : BIOS
  442.  
  443. Purpose : Sets the cursor position
  444.  
  445. Parms:
  446.       DH <-- row (1-25)
  447.       DL <-- column (1-40/80)
  448.  
  449. Description:
  450.  
  451. The BV_LOCATE service sets the cursor position.
  452.  
  453. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  454. keep the output from this service in a window.
  455.  
  456. Service : BV_MODE
  457.  
  458. Module  : BIOS Video Services
  459.  
  460. Compat  : BIOS
  461.  
  462. Purpose : Sets the screen mode
  463.  
  464. Parms:
  465.       AL <-- screen mode (0-7, 13-19, depending on video adapter)
  466.  
  467. Description:
  468.  
  469. The BV_MODE routine sets the screen mode.  This may be any of the following:
  470.  
  471.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  472.  
  473.        0   40x25    b&w     16  text       CGA, EGA, VGA
  474.        1   40x25    color   16  text       CGA, EGA, VGA
  475.        2   80x25    b&w     16  text       CGA, EGA, VGA
  476.  def-  3   80x25    color   16  text       CGA, EGA, VGA
  477.        4   320x200  color    4  graphics   CGA, EGA, VGA
  478.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  479.        6   640x200  color    2  graphics   CGA, EGA, VGA
  480.  mda-  7   80x25    b&w      -  text       MDA, EGA, VGA
  481.       13   320x200  color   16  graphics   EGA, VGA
  482.       14   640x200  color   16  graphics   EGA, VGA
  483.       15   640x350  mono     -  graphics   EGA, VGA
  484.       16   640x350  color   16  graphics   EGA, VGA
  485.       17   640x480  color    2  graphics   VGA
  486.       18   640x480  color   16  graphics   VGA
  487.       19   320x200  color  256  graphics   VGA
  488.  
  489. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  490. keep the output from this service in a window.
  491.  
  492. Service : BV_POPUP
  493.  
  494. Module  : BIOS Video Services
  495.  
  496. Compat  : BIOS
  497.  
  498. Purpose : Displays a pop-up window on the screen
  499.  
  500. Parms:
  501.    DS:DX <-- pointer to parameter list
  502.  
  503. Description:
  504.  
  505. The BV_POPUP service displays a pop-up window on the screen.  A variety of
  506. frames is available for the window.  Titles are optional and will be left-
  507. justified in the top bar of the window if supplied.
  508.  
  509. Frame types are as follows:
  510.  
  511.    0    none (blank)
  512.    1    single lines
  513.    2    double lines
  514.    3    single horizontal lines, double vertical lines
  515.    4    double horizontal lines, single vertical lines
  516.  
  517. The parameter list should look like this:
  518.  
  519. Y1           db ?            ; top row of window
  520. X1           db ?            ; left column of window
  521. Y2           db ?            ; bottom row of window
  522. X2           db ?            ; right column of window
  523. FRAMETYPE    db ?            ; frame type
  524. FRAMECOLOR   db ?            ; frame color
  525. TITLE        dw ?            ; offset (from DS:) of ASCIIZ title
  526.                              ; use 0FFFFh instead if no title is desired
  527.  
  528. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  529. keep the output from this service in a window.
  530.  
  531. Service : BV_SHOWCURSOR
  532.  
  533. Module  : BIOS Video Services
  534.  
  535. Compat  : BIOS
  536.  
  537. Purpose : Shows the cursor
  538.  
  539. Parms:
  540.    none
  541.  
  542. Description:
  543.  
  544. The BV_SHOWCURSOR service shows the cursor, making it visible.  NOTE: This
  545. service may change the cursor shape if used before BV_HIDECURSOR.
  546.  
  547. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  548. keep the output from this service in a window.
  549.  
  550.  
  551.  
  552.  
  553. Service : BV_STROUT
  554.  
  555. Module  : BIOS Video Services
  556.  
  557. Compat  : BIOS
  558.  
  559. Purpose : Displays a string on the screen
  560.  
  561. Parms:
  562.    DS:DX <-- ptr to string to display
  563.  
  564. Description:
  565.  
  566. The BV_STROUT routine displays a string on the screen.  The string must be in
  567. ASCIIZ format (NUL terminated).
  568.  
  569. The following control codes are interpreted:
  570.    7      Bell             beep
  571.    8      Backspace        non-destructive backspace
  572.    9      Tab              space over to the next tab stop
  573.   10      Linefeed         move cursor down one line, scrolling as needed
  574.   12      Formfeed         clear screen and home cursor
  575.   13      Carriage Return  home cursor on current line
  576.  
  577. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  578. keep the output from this service in a window.
  579.  
  580. Service : BV_WHERE
  581.  
  582. Module  : BIOS Video Services
  583.  
  584. Compat  : BIOS
  585.  
  586. Purpose : Gets the cursor position
  587.  
  588. Parms:
  589.    -------
  590.       DH = row (1-25)
  591.       DL = column (1-40/80)
  592.  
  593. Description:
  594.  
  595. The BV_WHERE service gets the cursor position.
  596.  
  597. Redirection, if any, is ignored.  Most windowing multitaskers will be able to
  598. keep the output from this service in a window.
  599.  
  600. Service : CG_CHROUT
  601.  
  602. Module  : CGA Graphics Services
  603.  
  604. Compat  : Clone
  605.  
  606. Purpose : Displays a character on the screen
  607.  
  608. Parms:
  609.       AL <-- character to display
  610.  
  611. Description:
  612.  
  613. The CG_CHROUT routine displays a character on the screen.  The screen must be
  614. in one of the CGA graphics modes (video modes 4-6).
  615.  
  616. The following control codes are interpreted:
  617.    7      Bell             beep
  618.    8      Backspace        non-destructive backspace
  619.    9      Tab              space over to the next tab stop
  620.   10      Linefeed         move cursor down one line, scrolling as needed
  621.   12      Formfeed         clear screen and home cursor
  622.   13      Carriage Return  home cursor on current line
  623.  
  624. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  625. keep the output from this service in a window.
  626.  
  627.  
  628.  
  629.  
  630. Service : CG_CLEOLN
  631.  
  632. Module  : CGA Graphics Services
  633.  
  634. Compat  : Clone
  635.  
  636. Purpose : Clears to the end of the line
  637.  
  638. Parms:
  639.    none
  640.  
  641. Description:
  642.  
  643. The CG_CLEOLN service clears from the current cursor position to the end of
  644. the current screen line, inclusive.  The screen must be in one of the CGA
  645. graphics modes (video modes 4-6).
  646.  
  647. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  648. keep the output from this service in a window.
  649.  
  650. Service : CG_CLS
  651.  
  652. Module  : CGA Graphics Services
  653.  
  654. Compat  : Clone
  655.  
  656. Purpose : Clears the screen
  657.  
  658. Parms:
  659.    none
  660.  
  661. Description:
  662.  
  663. The CG_CLS service clears the screen and homes the cursor to the upper left
  664. corner.  The screen must be in one of the CGA graphics modes (video modes
  665. 4-6).
  666.  
  667. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  668. keep the output from this service in a window.
  669.  
  670.  
  671.  
  672.  
  673. Service : CG_COLOR
  674.  
  675. Module  : CGA Graphics Services
  676.  
  677. Compat  : Clone
  678.  
  679. Purpose : Sets the default text color
  680.  
  681. Parms:
  682.       AL <-- default color
  683.  
  684. Description:
  685.  
  686. The CG_COLOR service sets the default text color.  A color/attribute table is
  687. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  688. high nybble and ranges 0-3; the foreground is in the low nybble and also
  689. ranges 0-3.  The actual colors displayed depend on the palette setting.
  690.  
  691. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  692. keep the output from this service in a window.
  693.  
  694. Service : CG_CRLF
  695.  
  696. Module  : CGA Graphics Services
  697.  
  698. Compat  : Clone
  699.  
  700. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  701.  
  702. Parms:
  703.    none
  704.  
  705. Description:
  706.  
  707. The CG_CRLF routine displays a carriage return and linefeed on the screen.
  708. The screen must be in one of the CGA graphics modes (video modes 4-6).
  709.  
  710. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  711. keep the output from this service in a window.
  712.  
  713.  
  714.  
  715.  
  716. Service : CG_GETCOLOR
  717.  
  718. Module  : CGA Graphics Services
  719.  
  720. Compat  : Clone
  721.  
  722. Purpose : Gets the default text color
  723.  
  724. Parms:
  725.    -------
  726.       AL = default color
  727.  
  728. Description:
  729.  
  730. The CG_GETCOLOR service gets the default text color.  A color/attribute table
  731. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  732. the high nybble and ranges 0-3; the foreground is in the low nybble and also
  733. ranges 0-3.  The actual colors displayed depend on the palette setting.
  734.  
  735. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  736. keep the output from this service in a window.
  737.  
  738. Service : CG_INIT
  739.  
  740. Module  : CGA Graphics Services
  741.  
  742. Compat  : Clone
  743.  
  744. Purpose : Initializes the CGA Graphics Services
  745.  
  746. Parms:
  747.    none
  748.  
  749. Description:
  750.  
  751. The CG_INIT routine initializes the CGA Graphics Services.  It should be used
  752. once in your program, before any other CGA Graphics Services are called.
  753.  
  754. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  755. keep the output from this service in a window.
  756.  
  757.  
  758.  
  759.  
  760. Service : CG_LOCATE
  761.  
  762. Module  : CGA Graphics Services
  763.  
  764. Compat  : Clone
  765.  
  766. Purpose : Sets the cursor position
  767.  
  768. Parms:
  769.       DH <-- row (1-25)
  770.       DL <-- column (1-40/80)
  771.  
  772. Description:
  773.  
  774. The CG_LOCATE service sets the cursor position.  The screen must be in one of
  775. the CGA graphics modes (video modes 4-6).
  776.  
  777. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  778. keep the output from this service in a window.
  779.  
  780. Service : CG_MODE
  781.  
  782. Module  : CGA Graphics Services
  783.  
  784. Compat  : Clone
  785.  
  786. Purpose : Sets the screen mode
  787.  
  788. Parms:
  789.       AL <-- screen mode (4-6)
  790.  
  791. Description:
  792.  
  793. The CG_MODE routine sets the screen mode.  This may be any of the following:
  794.  
  795.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  796.  
  797.        4   320x200  color    4  graphics   CGA, EGA, VGA
  798.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  799.        6   640x200  color    2  graphics   CGA, EGA, VGA
  800.  
  801. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  802. keep the output from this service in a window.
  803.  
  804.  
  805.  
  806.  
  807. Service : CG_STROUT
  808.  
  809. Module  : CGA Graphics Services
  810.  
  811. Compat  : Clone
  812.  
  813. Purpose : Displays a string on the screen
  814.  
  815. Parms:
  816.    DS:DX <-- ptr to the string to display
  817.  
  818. Description:
  819.  
  820. The CG_STROUT routine displays a string on the screen.  The string must be in
  821. ASCIIZ (NUL terminated) format.  The screen must be in one of the CGA
  822. graphics modes (video modes 4-6).
  823.  
  824. The following control codes are interpreted:
  825.    7      Bell             beep
  826.    8      Backspace        non-destructive backspace
  827.    9      Tab              space over to the next tab stop
  828.   10      Linefeed         move cursor down one line, scrolling as needed
  829.   12      Formfeed         clear screen and home cursor
  830.   13      Carriage Return  home cursor on current line
  831.  
  832. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  833. keep the output from this service in a window.
  834.  
  835. Service : CG_WHERE
  836.  
  837. Module  : CGA Graphics Services
  838.  
  839. Compat  : Clone
  840.  
  841. Purpose : Gets the cursor position
  842.  
  843. Parms:
  844.    -------
  845.       DH = row (1-25)
  846.       DL = column (1-40/80)
  847.  
  848. Description:
  849.  
  850. The CG_WHERE service gets the cursor position.  The screen must be in one of
  851. the CGA graphics modes (video modes 4-6).
  852.  
  853. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  854. keep the output from this service in a window.
  855.  
  856. Service : DV_CHROUT
  857.  
  858. Module  : DOS Video Services
  859.  
  860. Compat  : DOS
  861.  
  862. Purpose : Displays a character on the screen
  863.  
  864. Parms:
  865.       AL <-- character to display
  866.  
  867. Description:
  868.  
  869. The DV_CHROUT routine displays a character on the screen.
  870.  
  871. The following control codes are interpreted:
  872.    7      Bell             beep
  873.    8      Backspace        non-destructive backspace
  874.    9      Tab              space over to the next tab stop
  875.   10      Linefeed         move cursor down one line, scrolling as needed
  876.   13      Carriage Return  home cursor on current line
  877.  
  878. Redirection, if any, is in effect.  Text from this service may be redirected
  879. to any file or device.  Pipes can also be used.  Almost all windowing
  880. multitaskers will be able to keep the output from this service in a window.
  881.  
  882.  
  883.  
  884.  
  885. Service : DV_CLEOLN
  886.  
  887. Module  : DOS Video Services
  888.  
  889. Compat  : DOS (with ANSI)
  890.  
  891. Purpose : Clears to the end of the line
  892.  
  893. Parms:
  894.    none
  895.  
  896. Description:
  897.  
  898. The DV_CLEOLN service clears from the current cursor position to the end of
  899. the current screen line, inclusive.  It requires ANSI.
  900.  
  901. Redirection, if any, is in effect.  Text from this service may be redirected
  902. to any file or device.  Pipes can also be used.  Almost all windowing
  903. multitaskers will be able to keep the output from this service in a window.
  904.  
  905. Service : DV_CLS
  906.  
  907. Module  : DOS Video Services
  908.  
  909. Compat  : DOS (with ANSI)
  910.  
  911. Purpose : Clears the screen
  912.  
  913. Parms:
  914.    none
  915.  
  916. Description:
  917.  
  918. The DV_CLS service clears the screen and homes the cursor to the upper left
  919. corner.  It requires ANSI.
  920.  
  921. Redirection, if any, is in effect.  Text from this service may be redirected
  922. to any file or device.  Pipes can also be used.  Almost all windowing
  923. multitaskers will be able to keep the output from this service in a window.
  924.  
  925.  
  926.  
  927.  
  928. Service : DV_COLOR
  929.  
  930. Module  : DOS Video Services
  931.  
  932. Compat  : DOS (with ANSI)
  933.  
  934. Purpose : Sets the default text color
  935.  
  936. Parms:
  937.       AL <-- default color
  938.  
  939. Description:
  940.  
  941. The DV_COLOR service sets the default text color.  A color/attribute table is
  942. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  943. high nybble and ranges 0-7 in text modes, 0 in graphics modes; the foreground
  944. is in the low nybble and ranges 0-7 in text modes, 0-x in graphics modes.
  945.  
  946. Redirection, if any, is in effect.  Text from this service may be redirected
  947. to any file or device.  Pipes can also be used.  Almost all windowing
  948. multitaskers will be able to keep the output from this service in a window.
  949.  
  950. Service : DV_CRLF
  951.  
  952. Module  : DOS Video Services
  953.  
  954. Compat  : DOS
  955.  
  956. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  957.  
  958. Parms:
  959.    none
  960.  
  961. Description:
  962.  
  963. The DV_CRLF routine displays a carriage return and linefeed on the screen.
  964.  
  965. Redirection, if any, is in effect.  Text from this service may be redirected
  966. to any file or device.  Pipes can also be used.  Almost all windowing
  967. multitaskers will be able to keep the output from this service in a window.
  968.  
  969.  
  970.  
  971.  
  972. Service : DV_DELLINE
  973.  
  974. Module  : DOS Video Services
  975.  
  976. Compat  : DOS (with extended ANSI)
  977.  
  978. Purpose : Deletes the current screen row
  979.  
  980. Parms:
  981.    none
  982.  
  983. Description:
  984.  
  985. The DV_DELLINE service deletes the row on which the cursor is placed.  Any
  986. rows beneath it are moved up and the bottom line of the screen is cleared to
  987. a row of spaces in the current screen colors.
  988.  
  989. This service is only available under extended versions of the ANSI driver,
  990. such as NANSI.SYS and ZANSI.SYS.  It requires the use of an ANSI code which
  991. is not implemented in the standard IBM subset of the ANSI protocol.
  992.  
  993. Redirection, if any, is in effect.  Text from this service may be redirected
  994. to any file or device.  Pipes can also be used.  Almost all windowing
  995. multitaskers will be able to keep the output from this service in a window.
  996.  
  997. Service : DV_INSLINE
  998.  
  999. Module  : DOS Video Services
  1000.  
  1001. Compat  : DOS (with extended ANSI)
  1002.  
  1003. Purpose : Inserts a line at the current screen row
  1004.  
  1005. Parms:
  1006.    none
  1007.  
  1008. Description:
  1009.  
  1010. The DV_INSLINE service inserts a row at the current cursor location.  Any
  1011. rows beneath it are moved down and the new line screen is cleared to a row of
  1012. spaces in the current screen colors.
  1013.  
  1014. This service is only available under extended versions of the ANSI driver,
  1015. such as NANSI.SYS and ZANSI.SYS.  It requires the use of an ANSI code which
  1016. is not implemented in the standard IBM subset of the ANSI protocol.
  1017.  
  1018. Redirection, if any, is in effect.  Text from this service may be redirected
  1019. to any file or device.  Pipes can also be used.  Almost all windowing
  1020. multitaskers will be able to keep the output from this service in a window.
  1021.  
  1022.  
  1023.  
  1024.  
  1025. Service : DV_LOCATE
  1026.  
  1027. Module  : DOS Video Services
  1028.  
  1029. Compat  : DOS (with ANSI)
  1030.  
  1031. Purpose : Sets the cursor position
  1032.  
  1033. Parms:
  1034.       DH <-- row (1-25)
  1035.       DL <-- column (1-40/80)
  1036.  
  1037. Description:
  1038.  
  1039. The DV_LOCATE service sets the cursor position.  It requires ANSI.
  1040.  
  1041. Redirection, if any, is in effect.  Text from this service may be redirected
  1042. to any file or device.  Pipes can also be used.  Almost all windowing
  1043. multitaskers will be able to keep the output from this service in a window.
  1044.  
  1045. Service : DV_MODE
  1046.  
  1047. Module  : DOS Video Services
  1048.  
  1049. Compat  : DOS (with ANSI)
  1050.  
  1051. Purpose : Sets the screen mode
  1052.  
  1053. Parms:
  1054.       AL <-- screen mode (0-6)
  1055.  
  1056. Description:
  1057.  
  1058. The DV_MODE routine sets the screen mode.  This may be any of the following:
  1059.  
  1060.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  1061.  
  1062.        0   40x25    b&w     16  text       CGA, EGA, VGA
  1063.        1   40x25    color   16  text       CGA, EGA, VGA
  1064.        2   80x25    b&w     16  text       CGA, EGA, VGA
  1065.  def-  3   80x25    color   16  text       CGA, EGA, VGA
  1066.        4   320x200  color    4  graphics   CGA, EGA, VGA
  1067.        5   320x200  b&w      4  graphics   CGA, EGA, VGA
  1068.        6   640x200  color    2  graphics   CGA, EGA, VGA
  1069.  
  1070. Additional modes may be available, depending on the ANSI driver used.  See
  1071. description of the BV_MODE service for information on these additional modes.
  1072.  
  1073. Redirection, if any, is in effect.  Text from this service may be redirected
  1074. to any file or device.  Pipes can also be used.  Almost all windowing
  1075. multitaskers will be able to keep the output from this service in a window.
  1076.  
  1077. Service : DV_STROUT
  1078.  
  1079. Module  : DOS Video Services
  1080.  
  1081. Compat  : DOS
  1082.  
  1083. Purpose : Displays a string on the screen
  1084.  
  1085. Parms:
  1086.    DS:DX <-- ptr to the string to display
  1087.  
  1088. Description:
  1089.  
  1090. The DV_STROUT routine displays a string on the screen.  The string must be in
  1091. ASCIIZ (NUL terminated) format.
  1092.  
  1093. The following control codes are interpreted:
  1094.    7      Bell             beep
  1095.    8      Backspace        non-destructive backspace
  1096.    9      Tab              space over to the next tab stop
  1097.   10      Linefeed         move cursor down one line, scrolling as needed
  1098.   13      Carriage Return  home cursor on current line
  1099.  
  1100. Redirection, if any, is in effect.  Text from this service may be redirected
  1101. to any file or device.  Pipes can also be used.  Almost all windowing
  1102. multitaskers will be able to keep the output from this service in a window.
  1103.  
  1104. Service : MA_ADD32
  1105.  
  1106. Module  : Math (32-bit) Services
  1107.  
  1108. Compat  : Any
  1109.  
  1110. Purpose : Adds two unsigned long integers
  1111.  
  1112. Parms:
  1113.    DS:SI   <-- first operand
  1114.    DS:SI+4 <-- second operand
  1115.    -------
  1116.    DS:SI+8 = result
  1117.  
  1118. Description:
  1119.  
  1120. The MA_ADD32 routine adds two unsigned long integers, giving a result of the
  1121. same type.  Since such numbers are rather bulky, they are passed through a
  1122. buffer rather than through registers.  The numbers in the buffer are stored
  1123. in normal Intel format, least significant word to most significant word.  The
  1124. buffer should look something like this:
  1125.  
  1126.    FIRST32   dd ?
  1127.    SECOND32  dd ?
  1128.    RESULT32  dd ?
  1129.  
  1130. Service : MA_DIV32
  1131.  
  1132. Module  : Math (32-bit) Services
  1133.  
  1134. Compat  : Any
  1135.  
  1136. Purpose : Divides an unsigned "near very long" integer by a long integer
  1137.  
  1138. Parms:
  1139.    DS:SI   <-- dividend (64 bits: high bit must be zero)
  1140.    DS:SI+8 <-- divisor (unsigned long integer)
  1141.    -------
  1142.    DS:SI+12 = quotient (unsigned long integer)
  1143.    DS:SI+16 = remainder (unsigned long integer)
  1144.  
  1145. Description:
  1146.  
  1147. The MA_DIV32 routine divides an unsigned 63-bit integer by an unsigned long
  1148. integer, giving a quotient and remainder.
  1149.  
  1150. Since the numbers are rather bulky, they are passed through a buffer rather
  1151. than through registers.  The numbers in the buffer are stored in normal Intel
  1152. format, least significant word to most significant word.  The buffer should
  1153. look something like this:
  1154.  
  1155.    FIRST64   dq ?
  1156.    SECOND32  dd ?
  1157.    RESULT32  dd ?
  1158.    REMAIN32  dd ?
  1159.  
  1160. Note that since this service uses unsigned numbers, it is possible to use it
  1161. to divide a 32-bit quantity by another 32-bit quantity, giving a 32-bit
  1162. result.  In that case, just convert the 32-bit dividend to 64 bits by making
  1163. the upper 32 bits zero.  The BC_LONG2ASC service uses this approach in the
  1164. course of its work.
  1165.  
  1166. Service : MA_MUL32
  1167.  
  1168. Module  : Math (32-bit) Services
  1169.  
  1170. Compat  : Any
  1171.  
  1172. Purpose : Multiplies two unsigned long integers
  1173.  
  1174. Parms:
  1175.    DS:SI   <-- first operand
  1176.    DS:SI+4 <-- second operand
  1177.    -------
  1178.    DS:SI+8 = result (64 bits)
  1179.  
  1180. Description:
  1181.  
  1182. The MA_MUL32 routine multiplies two unsigned long integers, giving a result
  1183. of a type that might be called an unsigned very long integer (64 bits).
  1184. Since such numbers are rather bulky, they are passed through a buffer rather
  1185. than through registers.  The numbers in the buffer are stored in normal Intel
  1186. format, least significant word to most significant word.  The buffer should
  1187. look something like this:
  1188.  
  1189.    FIRST32   dd ?
  1190.    SECOND32  dd ?
  1191.    RESULT64  dq ?
  1192.  
  1193. Note that since this service uses unsigned numbers, it is possible to use it
  1194. to multiply a 32-bit quantity by a 16-bit quantity, giving (maybe) a 32-bit
  1195. result.  In that case, just convert the 16-bit quantity to 32 bits by making
  1196. the upper 16 bits zero; if the next-to-highest word of the result is nonzero,
  1197. there was an overflow, and the result did not fit into 32 bits.
  1198.  
  1199. Service : MA_SUB32
  1200.  
  1201. Module  : Math (32-bit) Services
  1202.  
  1203. Compat  : Any
  1204.  
  1205. Purpose : Subtracts one unsigned long integer from another
  1206.  
  1207. Parms:
  1208.    DS:SI   <-- first operand
  1209.    DS:SI+4 <-- second operand
  1210.    -------
  1211.    DS:SI+8 = result
  1212.  
  1213. Description:
  1214.  
  1215. The MA_SUB32 routine subtracts one unsigned long integer from another, giving
  1216. a result of the same type.  Since such numbers are rather bulky, they are
  1217. passed through a buffer rather than through registers.  The numbers in the
  1218. buffer are stored in normal Intel format, least significant word to most
  1219. significant word.  The buffer should look something like this:
  1220.  
  1221.    FIRST32   dd ?
  1222.    SECOND32  dd ?
  1223.    RESULT32  dd ?
  1224.  
  1225. Service : MD_DELAY
  1226.  
  1227. Module  : Delay Services
  1228.  
  1229. Compat  : Clone
  1230.  
  1231. Purpose : Delays for a number of 100ths of seconds
  1232.  
  1233. Parms:
  1234.       CX <-- delay (0-32767)
  1235.  
  1236. Description:
  1237.  
  1238. The MD_DELAY service waits for a specified number of clock ticks.  This is
  1239. based on the timer system initialized by the MD_INIT service.  Timer #0 is
  1240. used by MD_DELAY, so you should avoid Timer #0 if you use MD_DELAY.
  1241.  
  1242. If you use the 100th-second time services, it is vital that you initialize
  1243. them with MD_INIT (at the start of your program) and terminate them with
  1244. MD_DONE (at the end of your program).
  1245.  
  1246. Since the system clock is maintained via the interrupt system, interrupts
  1247. will be enabled for the duration of this service, to avoid an infinite delay.
  1248.  
  1249. This service has been designed to accommodate multitaskers.  If another task
  1250. is in operation, the delay may be a trifle longer than expected, however.
  1251.  
  1252.  
  1253.  
  1254.  
  1255. Service : MD_DONE
  1256.  
  1257. Module  : Delay Services
  1258.  
  1259. Compat  : Clone
  1260.  
  1261. Purpose : Terminates the 100th-second timer handler
  1262.  
  1263. Parms:
  1264.    none
  1265.  
  1266. Description:
  1267.  
  1268. The MD_DONE service terminates the 100th-second timer handler.  The original
  1269. timer interrupt is restored and the system clock is reset to 18.2 cycles per
  1270. second, which is presumed to have been the original speed.
  1271.  
  1272. If you use the 100th-second time services, it is vital that you initialize
  1273. them with MD_INIT (at the start of your program) and terminate them with
  1274. MD_DONE (at the end of your program).
  1275.  
  1276. Service : MD_GETTIMER
  1277.  
  1278. Module  : Delay Services
  1279.  
  1280. Compat  : Clone
  1281.  
  1282. Purpose : Gets one of the 100th-second countdown timers
  1283.  
  1284. Parms:
  1285.       AL <-- timer number (0-3)
  1286.    -------
  1287.       CX = time count (0-65,534)
  1288.  
  1289. Description:
  1290.  
  1291. The MD_GETTIMER service gets the time remaining from one of the 100th-second
  1292. countdown timers.  The time returned will be in 200ths of seconds.  It is
  1293. expected that you will normally just compare the result with zero to see if
  1294. the countdown time has elapsed.  See the MD_SETTIMER service for details.
  1295.  
  1296. If you use the 100th-second time services, it is vital that you initialize
  1297. them with MD_INIT (at the start of your program) and terminate them with
  1298. MD_DONE (at the end of your program).
  1299.  
  1300.  
  1301.  
  1302.  
  1303. Service : MD_INIT
  1304.  
  1305. Module  : Delay Services
  1306.  
  1307. Compat  : Clone
  1308.  
  1309. Purpose : Initializes the 100th-second timer handler
  1310.  
  1311. Parms:
  1312.    none
  1313.  
  1314. Description:
  1315.  
  1316. The MD_INIT service initializes the 100th-second timer handler.  The system
  1317. clock is reset to 200.27 cycles per second.  The old timer interrupt is
  1318. executed every 11th time through, so as to maintain the usual 18.2 cycles per
  1319. second for the rest of the system.
  1320.  
  1321. If you use the 100th-second time services, it is vital that you initialize
  1322. them with MD_INIT (at the start of your program) and terminate them with
  1323. MD_DONE (at the end of your program).
  1324.  
  1325. The MD_INIT service provides up to four countdown timers which may be
  1326. accessed by the MD_SETTIMER and MD_GETTIMER services.  These countdown timers
  1327. decrement their respective counts at a rate of 100 per second.  The count is
  1328. not allowed to go below zero.
  1329.  
  1330. Service : MD_SETTIMER
  1331.  
  1332. Module  : Delay Services
  1333.  
  1334. Compat  : Clone
  1335.  
  1336. Purpose : Sets one of the 100th-second countdown timers
  1337.  
  1338. Parms:
  1339.       AL <-- timer number (0-3)
  1340.       CX <-- time count (0-32,767)
  1341.  
  1342. Description:
  1343.  
  1344. The MD_SETTIMER service sets one of the 100th-second countdown timers going.
  1345. The time will be decremented once every 100th of a second until it reaches
  1346. zero.  This is useful for occasions where you need to do something within a
  1347. specified amount of time.  For instance, in a communications program you
  1348. might want a "receive character" routine to keep looking for a character for
  1349. up to a second before returning a "time out" error.
  1350.  
  1351. Up to four countdown timers are available.  Timer 0 is used by MD_DELAY, so
  1352. don't access it if you wish to use the MD_DELAY service.  Timer 1 is reserved
  1353. for the upcoming MU_MUSIC music service, so don't use it if you would like to
  1354. add music to a future program.  Timers 2-3 are always available for your own
  1355. use.
  1356.  
  1357. The time count is restricted to a maximum of 32,767 because it is doubled
  1358. internally.  The timer runs at 200 cycles per second to improve accuracy and
  1359. make it easy to maintain the old 18.2 cycles per second for the system.
  1360.  
  1361. If you use the 100th-second time services, it is vital that you initialize
  1362. them with MD_INIT (at the start of your program) and terminate them with
  1363. MD_DONE (at the end of your program).
  1364.  
  1365.  
  1366.  
  1367.  
  1368. Service : MD_TICK
  1369.  
  1370. Module  : Delay Services
  1371.  
  1372. Compat  : Clone
  1373.  
  1374. Purpose : Delays for a number of clock ticks (18ths of seconds)
  1375.  
  1376. Parms:
  1377.       CX <-- delay (0-65535)
  1378.  
  1379. Description:
  1380.  
  1381. The MD_TICK service waits for a specified number of clock ticks.  This is
  1382. based on the system clock.  There are about 18.2 ticks per second, so the
  1383. delay for one tick is approximately 1/18th second.
  1384.  
  1385. Since the system clock is maintained via the interrupt system, interrupts
  1386. will be enabled for the duration of this service, to avoid an infinite delay.
  1387.  
  1388. This service has been designed to accommodate multitaskers.  If another task
  1389. is in operation, the delay may be a trifle longer than expected, however.
  1390.  
  1391. Service : ME_HIGHOFS
  1392.  
  1393. Module  : Memory Services
  1394.  
  1395. Compat  : Any
  1396.  
  1397. Purpose : Converts an address to have the lowest segment and highest offset
  1398.  
  1399. Parms:
  1400.    DX:AX <-- segment:offset
  1401.    -------
  1402.    DX:AX = converted segment:offset
  1403.  
  1404. Description:
  1405.  
  1406. The ME_HIGHOFS service converts an address so that it has the highest
  1407. possible offset and lowest possible segment.  This allows you to work
  1408. backwards from this address by up to 65,519 bytes without wrapping around
  1409. within the segment, which is a convenience for reverse REP operations, for
  1410. example.  The resulting offset will be in the range FFF0h - FFFFh, unless the
  1411. address is extremely low in memory, in which case the range may be lower.
  1412.  
  1413.  
  1414.  
  1415.  
  1416. Service : ME_LOWOFS
  1417.  
  1418. Module  : Memory Services
  1419.  
  1420. Compat  : Any
  1421.  
  1422. Purpose : Converts an address to have the highest segment and lowest offset
  1423.  
  1424. Parms:
  1425.    DX:AX <-- segment:offset
  1426.    -------
  1427.    DX:AX = converted segment:offset
  1428.  
  1429. Description:
  1430.  
  1431. The ME_LOWOFS service converts an address so that it has the lowest possible
  1432. offset and highest possible segment.  This allows you to work forwards from
  1433. this address by up to 65,519 bytes without wrapping around within the
  1434. segment, which is a convenience for forward REP operations, for example.  The
  1435. resulting offset will be in the range 0000h - 000Fh.
  1436.  
  1437. Service : ME_MOVE
  1438.  
  1439. Module  : Memory Services
  1440.  
  1441. Compat  : Any
  1442.  
  1443. Purpose : Moves a block of data from one place to another
  1444.  
  1445. Parms:
  1446.    DS:SI <-- source segment:offset
  1447.    ES:DI <-- destination segment:offset
  1448.       CX <-- bytes to move (0 - 65,519)
  1449.  
  1450. Description:
  1451.  
  1452. The ME_MOVE service moves data from one place to another.  It automatically
  1453. handles overlaps, so the data will always be copied correctly.
  1454.  
  1455. The reason ME_MOVE can only handle up to 65,519 characters rather than a full
  1456. 65,535 is because it uses the ME_LOWOFS and ME_HIGHOFS services rather than
  1457. recalculating and re-normalizing the addresses every time.  The loss of a few
  1458. bytes' range is, in most cases, an acceptable price for the vastly increased
  1459. speed.  If you need greater range, calling ME_MOVE more than once may be a
  1460. bit of a nuisance, but it will still be considerably faster than the
  1461. recalculation approach.
  1462.  
  1463. Service : MI_BOOT
  1464.  
  1465. Module  : Miscellaneous Services
  1466.  
  1467. Compat  : Clone
  1468.  
  1469. Purpose : Reboots the computer (warm boot)
  1470.  
  1471. Parms:
  1472.    none
  1473.  
  1474. Description:
  1475.  
  1476. The MI_BOOT service restarts the computer by performing a warm boot.
  1477.  
  1478. I'd provide a "cold boot" service as well, but I've found that doing a cold
  1479. boot is liable to lock up many clones, including some Compaq models.  The
  1480. warm boot, however, has worked on every clone to which I've had access.
  1481.  
  1482. This service may be accessed by JMP instead of CALL if you prefer.  It really
  1483. doesn't matter, since the stack is reset and control is returned to the
  1484. system during the boot process.  The JMP is trivially more efficient, though.
  1485.  
  1486. Service : MI_MATCHFILE
  1487.  
  1488. Module  : Miscellaneous Services
  1489.  
  1490. Compat  : Any
  1491.  
  1492. Purpose : Determines whether a filename matches a given pattern
  1493.  
  1494. Parms:
  1495.    DS:SI <-- ptr to pattern (which may contain wildcards)
  1496.    ES:DI <-- ptr to filename (which may not contain drive or path specs)
  1497.    -------
  1498.       flags: ZF = the filename matches the pattern
  1499.              NZ = the filename does not match the pattern
  1500.  
  1501. Description:
  1502.  
  1503. The MI_MATCHFILE routine compares a filename with a specified pattern.  The
  1504. pattern may contain the "*" or "?" wildcards.  This pattern-matching service
  1505. works just the way DOS does.  It can be used for finding a desired set of
  1506. matches within a list of known files, for excluding an unwanted set of files
  1507. from a directory list, and so forth.
  1508.  
  1509. The DOS "DEL" command is used as a basis for this matcher.  Thus, using "*"
  1510. as a pattern is equivalent to using "*.", not "*.*" as "DIR" would interpret
  1511. the pattern.  The matcher uses the more conservative algorithm in an attempt
  1512. to avoid excessive broadness in its matches.  If you prefer otherwise, simply
  1513. have your program replace the "*" pattern with "*.*" before calling this
  1514. service.
  1515.  
  1516. Service : MI_PARSE
  1517.  
  1518. Module  : Miscellaneous Services
  1519.  
  1520. Compat  : DOS
  1521.  
  1522. Purpose : Parses a command line into file specifications and options
  1523.  
  1524. Parms:
  1525.    DS:SI <-- ptr to command line (for COM files, is CS:0080h)
  1526.    ES:DI <-- ptr to filename buffer (recommend 128 bytes)
  1527.    ES:BX <-- ptr to option buffer (recommend 128 bytes)
  1528.       AL <-- switch character (normally "/" for DOS)
  1529.    -------
  1530.       AH = number of options
  1531.       AL = number of filenames
  1532.  
  1533. Description:
  1534.  
  1535. The MI_PARSE routine takes the information passed to your program on the
  1536. command line and parses it into filenames and options.
  1537.  
  1538. The command line is everything that comes after your program name when the
  1539. user types in the name of your program.  It is generally used for passing
  1540. filenames and options to your program.  DOS itself is rather crude about such
  1541. matters and simply passes the original input to your program, after removing
  1542. the name of the program itself and any piping or redirection which may have
  1543. been done.
  1544.  
  1545. This routine assumes that anything which isn't an option is a filename.  Of
  1546. course, this need not be true, but it's a convenient fiction for separating
  1547. the options from the rest of the information.
  1548.  
  1549. Options may be delimited by the character of your choice.  DOS normally uses
  1550. "/" and assumes "\" is used for specifying paths.  Many people prefer the
  1551. *nix convention of "-" for switches and "/" for specifying paths, however, so
  1552. this routine allows for that possibility.  DOS will recognize "/" as being
  1553. the same as "\" in any DOS interrupt that accepts paths, so this works out
  1554. fairly well, since *nix folks are accustomed to using "/" as a path
  1555. delimiter.  It's somewhat appalling that Microsoft/IBM deliberately chose to
  1556. avoid the *nix conventions, but it is certainly handy that DOS will (more or
  1557. less) accept such usage internally, if not at the command level.  Note that
  1558. use of "-" as a switch character means that you will not be able to access
  1559. any files which contain "-" characters in the filename. This is rarely a
  1560. problem, but it can happen.
  1561.  
  1562. The two parameter tables, filenames and options, will consist of strings in
  1563. their original order in the command line.  Each string will be terminated by
  1564. a null character, in keeping with C usage.  The number of strings in each
  1565. parameter table is returned by MI_PARSE in one or another half of the AX
  1566. register, as specified in the "Parms" list, above.
  1567.  
  1568. You will normally specify the offset of the command-line within the PSP for
  1569. this service.  For COM-format files, this is CS:0080h.  For EXE-format files,
  1570. use the initial CS value with the same 0080h offset.  With later DOS
  1571. versions, it is possible to ask DOS to give you the segment of the PSP, but
  1572. since many people only have earlier DOS versions, that is not necessarily a
  1573. good idea.  Stick with the original CS, if you know it, and you'll be fine.
  1574.  
  1575. Service : MI_RANDOM
  1576.  
  1577. Module  : Miscellaneous Services
  1578.  
  1579. Compat  : Any
  1580.  
  1581. Purpose : Generates a pseudo-random number
  1582.  
  1583. Parms:
  1584.       DX <-- range of the desired pseudo-random number (1-4000)
  1585.    -------
  1586.       AX = pseudo-random number (0 to DX - 1)
  1587.  
  1588. Description:
  1589.  
  1590. The MI_RANDOM service generates pseudo-random numbers within a desired range.
  1591.  
  1592. A linear congruential method is used to generate the numbers.  The algorithm
  1593. was derived from the book "How to Solve it by Computer", by R. G. Dromey
  1594. (Prentiss-Hall).
  1595.  
  1596. See also the MI_RANDOMIZE service, which is used to initialize the random
  1597. number generator.
  1598.  
  1599.  
  1600.  
  1601.  
  1602. Service : MI_RANDOMIZE
  1603.  
  1604. Module  : Miscellaneous Services
  1605.  
  1606. Compat  : Any / Clone
  1607.  
  1608. Purpose : Initializes the pseudo-random number generator
  1609.  
  1610. Parms:
  1611.       AX <-- random number seed or 0FFFFh
  1612.  
  1613. Description:
  1614.  
  1615. The MI_RANDOMIZE routine initializes the MI_RANDOM random number generator
  1616. service.  You may specify your own random number seed (in which case this
  1617. routine is compatible with any PC) or use 0FFFFh for the routine to pick its
  1618. own seed (in which case this routine is only compatible with clones).
  1619.  
  1620. If you specify 0FFFFh, the random number seed is read directly from the timer
  1621. chip's countdown tick, giving a quite adequately random initial seed value.
  1622.  
  1623. Specifying your own seed may be done to maximize compatibility with the most
  1624. machines.  In that case, you will probably want to get a seed value from the
  1625. DOS time service, using the seconds value.  Use of the "hundredths of
  1626. seconds" value is not advised, as it is always zero on some machines.
  1627.  
  1628. You might also want to specify your own seed during debugging, to assure you
  1629. of a reproducible set of pseudo-random numbers.  The same stream of numbers
  1630. will always be generated from the same seed value.
  1631.  
  1632. Service : MI_SCANENV
  1633.  
  1634. Module  : Miscellaneous Services
  1635.  
  1636. Compat  : DOS
  1637.  
  1638. Purpose : Scans the DOS environment (or similar table) for a specified string
  1639.  
  1640. Parms:
  1641.    DS:SI <-- ptr to DOS environment
  1642.    ES:DI <-- ptr to string for which to seek
  1643.    -------
  1644.    DS:SI = ptr to parm value (if NC; CY is set if not found)
  1645.  
  1646. Description:
  1647.  
  1648. The MI_SCANENV routine scans the DOS environment for a specified string and
  1649. returns the value of the parameter which matches that string.  If there is no
  1650. matching parameter, the carry flag is set.
  1651.  
  1652. You may also use this routine for scanning your own tables if you format them
  1653. like the DOS environment: each entry of the table is an ASCIIZ string which
  1654. contains a parameter name and parameter value, seperated by an "equals" sign.
  1655. The end of the table is marked by an additional NUL character.  Matching is
  1656. case-sensitive ("comspec" will not match "COMSPEC").
  1657.  
  1658. The segment of the environment is stored at offset 002Ch within the PSP.  For
  1659. COM files, the segment is at CS:[002Ch] (see notes under MI_PARSE).  Since
  1660. parameters in the environment are stored in uppercase, you should make sure
  1661. that the string for which you seek is also capitalized.
  1662.  
  1663. The resulting match, if any, will be pointed to by DS:SI on exit.  It is the
  1664. value of the parameter, not the parameter name, which is returned.
  1665.  
  1666.  
  1667. Example:
  1668.       MOV   DS,DS:[002Ch]       ; assumes CS = DS = ES  (COM file)
  1669.       XOR   SI,SI
  1670.       MOV   ES,OFFSET TOFIND
  1671.       CALL  MI_SCANENV
  1672.       JC    NOTFOUND
  1673.       MOV   DX,SI
  1674.       CALL  DV_STROUT
  1675.       CALL  DV_CRLF
  1676.       (etc)
  1677.    NOTFOUND:
  1678.       (etc)
  1679.    TOFIND  DB "PATH",0
  1680.  
  1681. This example will search the environment for the "PATH" parameter.  If a PATH
  1682. exists, it will be displayed, looking perhaps like "D:\;C:\bin" (without the
  1683. quotes).
  1684.  
  1685. Service : MO_HIDECURSOR
  1686.  
  1687. Module  : Mouse Services
  1688.  
  1689. Compat  : BIOS (Microsoft-type mouse driver)
  1690.  
  1691. Purpose : Hides the mouse cursor
  1692.  
  1693. Parms:
  1694.    none
  1695.  
  1696. Description:
  1697.  
  1698. The MO_HIDECURSOR service hides the mouse cursor.  After using this service,
  1699. the mouse cursor will not be visible, although it will still be there.
  1700.  
  1701. This is a somewhat peculiar service.  If you use it more than once, it will
  1702. take more than one application of MO_SHOWCURSOR before the cursor actually
  1703. reappears.  The mouse driver keeps a "level of invisibility" counter rather
  1704. than simply turning the cursor on and off.
  1705.  
  1706.  
  1707.  
  1708.  
  1709. Service : MO_INIT
  1710.  
  1711. Module  : Mouse Services
  1712.  
  1713. Compat  : BIOS (Microsoft-type mouse driver)
  1714.  
  1715. Purpose : Initialize mouse, if any, and get info about it
  1716.  
  1717. Parms:
  1718.    -------
  1719.       AL = number of buttons (0-3)
  1720.  
  1721. Description:
  1722.  
  1723. The MO_INIT service initializes the mouse driver and returns the number of
  1724. buttons on the mouse.  If no mouse is available, the number of buttons will
  1725. be zero.  Otherwise, you can expect 2-3 buttons.
  1726.  
  1727. The Microsoft mouse is somewhat unusual in that it has only two buttons.
  1728. Most compatible mice have three.  The ASMWIZ mouse services will work with
  1729. either, but will ignore the middle button of three-button mice.
  1730.  
  1731. Service : MO_LOCATE
  1732.  
  1733. Module  : Mouse Services
  1734.  
  1735. Compat  : BIOS (Microsoft-type mouse driver)
  1736.  
  1737. Purpose : Sets the mouse cursor location
  1738.  
  1739. Parms:
  1740.       DH <-- row (1-25)
  1741.       DL <-- column (1-80)
  1742.  
  1743. Description:
  1744.  
  1745. The MO_LOCATE service sets the mouse cursor position.  It works whether or
  1746. not the mouse cursor is visible.
  1747.  
  1748. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  1749. screen.  In order to make it easier to handle the mouse for text, this
  1750. service automatically converts from an 80x25 format.
  1751.  
  1752.  
  1753.  
  1754.  
  1755. Service : MO_RANGE
  1756.  
  1757. Module  : Mouse Services
  1758.  
  1759. Compat  : BIOS (Microsoft-type mouse driver)
  1760.  
  1761. Purpose : Sets the mouse cursor range
  1762.  
  1763. Parms:
  1764.       CH <-- top row (1-25)
  1765.       CL <-- left column (1-80)
  1766.       DH <-- bottom row (1-25)
  1767.       DL <-- right column (1-80)
  1768.  
  1769. Description:
  1770.  
  1771. The MO_RANGE service sets the mouse cursor range.  The mouse cursor will be
  1772. constrained to the specified area of the screen.
  1773.  
  1774. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  1775. screen.  In order to make it easier to handle the mouse for text, this
  1776. service automatically converts from an 80x25 format.
  1777.  
  1778. Service : MO_SHOWCURSOR
  1779.  
  1780. Module  : Mouse Services
  1781.  
  1782. Compat  : BIOS (Microsoft-type mouse driver)
  1783.  
  1784. Purpose : Shows the mouse cursor
  1785.  
  1786. Parms:
  1787.    none
  1788.  
  1789. Description:
  1790.  
  1791. The MO_SHOWCURSOR service shows the mouse cursor.  After using this service,
  1792. the mouse cursor will (probably) be visible.
  1793.  
  1794. See the description of the MO_HIDECURSOR service for details on that
  1795. "probably" caution!
  1796.  
  1797.  
  1798.  
  1799.  
  1800. Service : MO_WHERE
  1801.  
  1802. Module  : Mouse Services
  1803.  
  1804. Compat  : BIOS (Microsoft-type mouse driver)
  1805.  
  1806. Purpose : Gets the mouse cursor location
  1807.  
  1808. Parms:
  1809.    -------
  1810.       AH = right mouse button (0 if not pressed, 1 if pressed)
  1811.       AL = left mouse button  (0 if not pressed, 1 if pressed)
  1812.       DH = row (1-25)
  1813.       DL = column (1-80)
  1814.  
  1815. Description:
  1816.  
  1817. The MO_WHERE service gets the mouse cursor position and current button
  1818. status.  It works whether or not the mouse cursor is visible.
  1819.  
  1820. Normally, the mouse driver uses coordinates based on a 640x200 virtual
  1821. screen.  In order to make it easier to handle the mouse for text, this
  1822. service automatically converts to an 80x25 format.
  1823.  
  1824. Service : MU_SOUND
  1825.  
  1826. Module  : Sound and Music Services
  1827.  
  1828. Compat  : Clone
  1829.  
  1830. Purpose : Produces a sound of the desired frequency and duration
  1831.  
  1832. Parms:
  1833.    AX <-- frequency of the sound, in cycles per second (Hertz)
  1834.    DX <-- duration of the sound (in 1/18th seconds)
  1835.  
  1836. Description:
  1837.  
  1838. The MU_SOUND routine produces a sound of the specified frequency (about
  1839. 50-4000 is useful) and duration (in 18ths of seconds).
  1840.  
  1841. If you are interested in producing music using this service, the following
  1842. table may prove of some use.  You can move down an octave by halving the
  1843. frequency for a given note (which can be efficiently accomplished using the
  1844. SHR or SHift Right assembly-language operation).  About seven octaves are
  1845. available on the usual PC compatible.
  1846.  
  1847. Note     Frequency (highest octave)
  1848. =====    =========
  1849.   A         3520
  1850. A#,B-       3714
  1851.   B         3952
  1852.   C         4186
  1853. C#,D-       4434
  1854.   D         4698
  1855. D#,E-       4978
  1856.   E         5274
  1857.   F         5588
  1858. F#,G-       5920
  1859.   G         6272
  1860. G#,A-       6644
  1861.  
  1862. Service : MV_CHROUT
  1863.  
  1864. Module  : Machine-level Video Services
  1865.  
  1866. Compat  : Clone
  1867.  
  1868. Purpose : Displays a character on the screen
  1869.  
  1870. Parms:
  1871.       AL <-- character to display
  1872.  
  1873. Description:
  1874.  
  1875. The MV_CHROUT routine displays a character on the screen.  The screen must be
  1876. in one of the text modes (video modes 0-3, 7).
  1877.  
  1878. The following control codes are interpreted:
  1879.    7      Bell             beep
  1880.    8      Backspace        non-destructive backspace
  1881.    9      Tab              space over to the next tab stop
  1882.   10      Linefeed         move cursor down one line, scrolling as needed
  1883.   12      Formfeed         clear screen and home cursor
  1884.   13      Carriage Return  home cursor on current line
  1885.  
  1886. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1887. keep the output from this service in a window.
  1888.  
  1889.  
  1890.  
  1891.  
  1892. Service : MV_CLEOLN
  1893.  
  1894. Module  : Machine-level Video Services
  1895.  
  1896. Compat  : Clone
  1897.  
  1898. Purpose : Clears to the end of the line
  1899.  
  1900. Parms:
  1901.    none
  1902.  
  1903. Description:
  1904.  
  1905. The MV_CLEOLN service clears from the current cursor position to the end of
  1906. the current screen line, inclusive.  The screen must be in one of the text
  1907. modes (video modes 0-3, 7).
  1908.  
  1909. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1910. keep the output from this service in a window.
  1911.  
  1912. Service : MV_CLS
  1913.  
  1914. Module  : Machine-level Video Services
  1915.  
  1916. Compat  : Clone
  1917.  
  1918. Purpose : Clears the screen
  1919.  
  1920. Parms:
  1921.    none
  1922.  
  1923. Description:
  1924.  
  1925. The MV_CLS service clears the screen and homes the cursor to the upper left
  1926. corner.  The screen must be in one of the text modes (video modes 0-3, 7).
  1927.  
  1928. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1929. keep the output from this service in a window.
  1930.  
  1931.  
  1932.  
  1933.  
  1934. Service : MV_COLOR
  1935.  
  1936. Module  : Machine-level Video Services
  1937.  
  1938. Compat  : Clone
  1939.  
  1940. Purpose : Sets the default text color
  1941.  
  1942. Parms:
  1943.       AL <-- default color
  1944.  
  1945. Description:
  1946.  
  1947. The MV_COLOR service sets the default text color.  A color/attribute table is
  1948. given in the ASMWIZ.DOC file.  In general, however, the background is in the
  1949. high nybble and ranges 0-7; the foreground is in the low nybble and also
  1950. ranges 0-7.  For bright, add 8 to the foreground; for blinking, add 8 to the
  1951. background.
  1952.  
  1953. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1954. keep the output from this service in a window.
  1955.  
  1956. Service : MV_CRLF
  1957.  
  1958. Module  : Machine-level Video Services
  1959.  
  1960. Compat  : Clone
  1961.  
  1962. Purpose : Displays a <CR><LF> (carriage return and linefeed)
  1963.  
  1964. Parms:
  1965.    none
  1966.  
  1967. Description:
  1968.  
  1969. The MV_CRLF routine displays a carriage return and linefeed on the screen.
  1970. The screen must be in one of the text modes (video modes 0-3, 7).
  1971.  
  1972. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1973. keep the output from this service in a window.
  1974.  
  1975.  
  1976.  
  1977.  
  1978. Service : MV_DELCHR
  1979.  
  1980. Module  : Machine-level Video Services
  1981.  
  1982. Compat  : Clone
  1983.  
  1984. Purpose : Deletes the character at the cursor
  1985.  
  1986. Parms:
  1987.    none
  1988.  
  1989. Description:
  1990.  
  1991. The MV_DELCHR service deletes the character on which the cursor is placed.
  1992. Any characters to the right of it are moved left and the rightmost column of
  1993. the screen is cleared to a space in the current screen colors.
  1994.  
  1995. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  1996. keep the output from this service in a window.
  1997.  
  1998. Service : MV_DELLINE
  1999.  
  2000. Module  : Machine-level Video Services
  2001.  
  2002. Compat  : Clone
  2003.  
  2004. Purpose : Deletes the current screen row
  2005.  
  2006. Parms:
  2007.    none
  2008.  
  2009. Description:
  2010.  
  2011. The MV_DELLINE service deletes the row on which the cursor is placed.  Any
  2012. rows beneath it are moved up and the bottom line of the screen is cleared to
  2013. a row of spaces in the current screen colors.
  2014.  
  2015. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2016. keep the output from this service in a window.
  2017.  
  2018.  
  2019.  
  2020.  
  2021. Service : MV_GETCOLOR
  2022.  
  2023. Module  : Machine-level Video Services
  2024.  
  2025. Compat  : Clone
  2026.  
  2027. Purpose : Gets the default text color
  2028.  
  2029. Parms:
  2030.    -------
  2031.       AL = default color
  2032.  
  2033. Description:
  2034.  
  2035. The MV_GETCOLOR service gets the default text color.  A color/attribute table
  2036. is given in the ASMWIZ.DOC file.  In general, however, the background is in
  2037. the high nybble and ranges 0-7; the foreground is in the low nybble and also
  2038. ranges 0-7.
  2039.  
  2040. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2041. keep the output from this service in a window.
  2042.  
  2043. Service : MV_HIDECURSOR
  2044.  
  2045. Module  : Machine-level Video Services
  2046.  
  2047. Compat  : Clone
  2048.  
  2049. Purpose : Hides the cursor
  2050.  
  2051. Parms:
  2052.    none
  2053.  
  2054. Description:
  2055.  
  2056. The MV_HIDECURSOR service hides the cursor, making it invisible.  This does
  2057. not affect normal cursor operation.
  2058.  
  2059. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2060. keep the output from this service in a window.
  2061.  
  2062.  
  2063.  
  2064.  
  2065. Service : MV_INIT
  2066.  
  2067. Module  : Machine-level Video Services
  2068.  
  2069. Compat  : Clone
  2070.  
  2071. Purpose : Initializes the Machine-level Video Services
  2072.  
  2073. Parms:
  2074.    none
  2075.  
  2076. Description:
  2077.  
  2078. The MV_INIT routine initializes the Machine-level Graphics Services.  It
  2079. should be used once in your program, before any other Machine-level Graphics
  2080. Services are called.
  2081.  
  2082. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2083. keep the output from this service in a window.
  2084.  
  2085. Service : MV_INSCHR
  2086.  
  2087. Module  : Machine-level Video Services
  2088.  
  2089. Compat  : Clone
  2090.  
  2091. Purpose : Inserts a space at the cursor position
  2092.  
  2093. Parms:
  2094.    none
  2095.  
  2096. Description:
  2097.  
  2098. The MV_INSCHR service inserts a space at the current cursor location.  Any
  2099. characters to the right of it are moved right and a space is inserted in the
  2100. current screen colors.
  2101.  
  2102. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2103. keep the output from this service in a window.
  2104.  
  2105.  
  2106.  
  2107.  
  2108. Service : MV_INSLINE
  2109.  
  2110. Module  : Machine-level Video Services
  2111.  
  2112. Compat  : Clone
  2113.  
  2114. Purpose : Inserts a line at the current screen row
  2115.  
  2116. Parms:
  2117.    none
  2118.  
  2119. Description:
  2120.  
  2121. The MV_INSLINE service inserts a row at the current cursor location.  Any
  2122. rows beneath it are moved down and the new line screen is cleared to a row of
  2123. spaces in the current screen colors.
  2124.  
  2125. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2126. keep the output from this service in a window.
  2127.  
  2128. Service : MV_LOCATE
  2129.  
  2130. Module  : Machine-level Video Services
  2131.  
  2132. Compat  : Clone
  2133.  
  2134. Purpose : Sets the cursor position
  2135.  
  2136. Parms:
  2137.       DH <-- row (1-25)
  2138.       DL <-- column (1-40/80)
  2139.  
  2140. Description:
  2141.  
  2142. The MV_LOCATE service sets the cursor position.  The screen must be in one of
  2143. the text modes (video modes 0-3, 7).
  2144.  
  2145. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2146. keep the output from this service in a window.
  2147.  
  2148.  
  2149.  
  2150.  
  2151. Service : MV_MODE
  2152.  
  2153. Module  : Machine-level Video Services
  2154.  
  2155. Compat  : Clone
  2156.  
  2157. Purpose : Sets the screen mode
  2158.  
  2159. Parms:
  2160.       AL <-- screen mode (0-3, 7)
  2161.  
  2162. Description:
  2163.  
  2164. The MV_MODE routine sets the screen mode.  This may be any of the following:
  2165.  
  2166.      Mode  Resolu.  Type  Colr  Use        Adapter(s)
  2167.  
  2168.        0   40x25    b&w     16  text       CGA, EGA, VGA
  2169.        1   40x25    color   16  text       CGA, EGA, VGA
  2170.        2   80x25    b&w     16  text       CGA, EGA, VGA
  2171.        3   80x25    color   16  text       CGA, EGA, VGA
  2172.        7   80x25    b&w      -  text       MDA, EGA, VGA
  2173.  
  2174. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2175. keep the output from this service in a window.
  2176.  
  2177. Service : MV_POPUP
  2178.  
  2179. Module  : Machine-level Video Services
  2180.  
  2181. Compat  : Clone
  2182.  
  2183. Purpose : Displays a pop-up window on the screen
  2184.  
  2185. Parms:
  2186.    DS:DX <-- pointer to parameter list
  2187.  
  2188. Description:
  2189.  
  2190. The MV_POPUP service displays a pop-up window on the screen.  A variety of
  2191. frames is available for the window.  Titles are optional and will be left-
  2192. justified in the top bar of the window if supplied.
  2193.  
  2194. Frame types are as follows:
  2195.  
  2196.    0    none (blank)
  2197.    1    single lines
  2198.    2    double lines
  2199.    3    single horizontal lines, double vertical lines
  2200.    4    double horizontal lines, single vertical lines
  2201.  
  2202. The parameter list should look like this:
  2203.  
  2204. Y1           db ?            ; top row of window
  2205. X1           db ?            ; left column of window
  2206. Y2           db ?            ; bottom row of window
  2207. X2           db ?            ; right column of window
  2208. FRAMETYPE    db ?            ; frame type
  2209. FRAMECOLOR   db ?            ; frame color
  2210. TITLE        dw ?            ; offset (from DS:) of ASCIIZ title
  2211.                              ; use 0FFFFh instead if no title is desired
  2212.  
  2213. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2214. keep the output from this service in a window.
  2215.  
  2216. Service : MV_SHOWCURSOR
  2217.  
  2218. Module  : Machine-level Video Services
  2219.  
  2220. Compat  : Clone
  2221.  
  2222. Purpose : Shows the cursor
  2223.  
  2224. Parms:
  2225.    none
  2226.  
  2227. Description:
  2228.  
  2229. The MV_SHOWCURSOR service shows the cursor, making it visible.  NOTE: This
  2230. service may change the cursor shape if used before MV_HIDECURSOR.
  2231.  
  2232. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2233. keep the output from this service in a window.
  2234.  
  2235.  
  2236.  
  2237.  
  2238. Service : MV_STROUT
  2239.  
  2240. Module  : Machine-level Video Services
  2241.  
  2242. Compat  : Clone
  2243.  
  2244. Purpose : Displays a string on the screen
  2245.  
  2246. Parms:
  2247.    DS:DX <-- ptr to the string to display
  2248.  
  2249. Description:
  2250.  
  2251. The MV_STROUT routine displays a string on the screen.  The string must be in
  2252. ASCIIZ (NUL terminated) format.  The screen must be in one of the text modes
  2253. (video modes 0-3, 7).
  2254.  
  2255. The following control codes are interpreted:
  2256.    7      Bell             beep
  2257.    8      Backspace        non-destructive backspace
  2258.    9      Tab              space over to the next tab stop
  2259.   10      Linefeed         move cursor down one line, scrolling as needed
  2260.   12      Formfeed         clear screen and home cursor
  2261.   13      Carriage Return  home cursor on current line
  2262.  
  2263. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2264. keep the output from this service in a window.
  2265.  
  2266. Service : MV_WHERE
  2267.  
  2268. Module  : Machine-level Video Services
  2269.  
  2270. Compat  : Clone
  2271.  
  2272. Purpose : Gets the cursor position
  2273.  
  2274. Parms:
  2275.    -------
  2276.       DH = row (1-25)
  2277.       DL = column (1-40/80)
  2278.  
  2279. Description:
  2280.  
  2281. The MV_WHERE service gets the cursor position.  The screen must be in one of
  2282. the text modes (video modes 0-3, 7).
  2283.  
  2284. Redirection, if any, is ignored.  Few windowing multitaskers will be able to
  2285. keep the output from this service in a window.
  2286.  
  2287. Service : S0_COMPARE
  2288.  
  2289. Module  : String Services
  2290.  
  2291. Compat  : Any
  2292.  
  2293. Purpose : Compares two strings
  2294.  
  2295. Parms:
  2296.    DS:SI <-- ptr to first string
  2297.    ES:DI <-- ptr to second string
  2298.    -------
  2299.    Flags = ZF if equal, NZ if not equal
  2300.    Flags = CY if first < second, NC if first >= second
  2301.  
  2302. Description:
  2303.  
  2304. The S0_COMPARE service compares two strings.  The carry flag and zero flag
  2305. are set as you might expect for a comparison operation.
  2306.  
  2307. Strings must be in ASCIIZ form (NUL terminated).
  2308.  
  2309.  
  2310.  
  2311.  
  2312. Service : S0_DUPE
  2313.  
  2314. Module  : String Services
  2315.  
  2316. Compat  : Any
  2317.  
  2318. Purpose : Creates a string by duplicating a specified character
  2319.  
  2320. Parms:
  2321.       AL <-- character to duplicate
  2322.       CX <-- number of times to repeat the character
  2323.    ES:DI <-- ptr to result string
  2324.  
  2325. Description:
  2326.  
  2327. The S0_DUPE service creates a string by repeating a single character.  The
  2328. resulting string will be in ASCIIZ form (NUL terminated), so be sure to use a
  2329. buffer large enough to hold both the string and its terminator.
  2330.  
  2331. Service : S0_LEFT
  2332.  
  2333. Module  : String Services
  2334.  
  2335. Compat  : Any
  2336.  
  2337. Purpose : Copies a section from the left of a string
  2338.  
  2339. Parms:
  2340.       CX <-- number of characters to copy
  2341.    DS:SI <-- ptr to source string
  2342.    ES:DI <-- ptr to result string
  2343.  
  2344. Description:
  2345.  
  2346. The S0_LEFT service copies a specified number of characters from the left of
  2347. one string into another.  If you prefer, you can use the same address for
  2348. both strings, allowing you to place the result back into the source buffer.
  2349.  
  2350. Strings must be in ASCIIZ form (NUL terminated).
  2351.  
  2352.  
  2353.  
  2354.  
  2355. Service : S0_LENGTH
  2356.  
  2357. Module  : String Services
  2358.  
  2359. Compat  : Any
  2360.  
  2361. Purpose : Returns the length of a string
  2362.  
  2363. Parms:
  2364.    DS:SI <-- ptr to source string
  2365.    -------
  2366.       CX = string length
  2367.  
  2368. Description:
  2369.  
  2370. The S0_LENGTH service returns the length of a string, not counting the NUL
  2371. terminator.
  2372.  
  2373. Strings must be in ASCIIZ form (NUL terminated).
  2374.  
  2375. Service : S0_LOCASE
  2376.  
  2377. Module  : String Services
  2378.  
  2379. Compat  : Any
  2380.  
  2381. Purpose : Converts a string to lowercase
  2382.  
  2383. Parms:
  2384.    DS:SI <-- ptr to source string
  2385.    ES:DI <-- ptr to result string
  2386.  
  2387. Description:
  2388.  
  2389. The S0_LOCASE service converts all of the alphabetic characters in a string
  2390. to lowercase.  As well as American alphabet characters, the international
  2391. alphabet characters supplied in the upper 128 IBM ASCII set are also
  2392. translated.
  2393.  
  2394. If you prefer, you can use the same address for both strings, allowing you to
  2395. place the result back into the source buffer.
  2396.  
  2397. Strings must be in ASCIIZ form (NUL terminated).
  2398.  
  2399.  
  2400.  
  2401.  
  2402. Service : S0_MID
  2403.  
  2404. Module  : String Services
  2405.  
  2406. Compat  : Any
  2407.  
  2408. Purpose : Copies a section of one string to another
  2409.  
  2410. Parms:
  2411.       CX <-- number of characters to copy
  2412.       DX <-- where to start copying from (1-x)
  2413.    DS:SI <-- ptr to source string
  2414.    ES:DI <-- ptr to result string
  2415.  
  2416. Description:
  2417.  
  2418. The S0_MID service copies a specified number of characters one string to
  2419. another, starting from a given location.  If you prefer, you can use the same
  2420. address for both strings, allowing you to place the result back into the
  2421. source buffer.
  2422.  
  2423. Strings must be in ASCIIZ form (NUL terminated).
  2424.  
  2425. Service : S0_RIGHT
  2426.  
  2427. Module  : String Services
  2428.  
  2429. Compat  : Any
  2430.  
  2431. Purpose : Copies a section from the right of a string
  2432.  
  2433. Parms:
  2434.       CX <-- number of characters to copy
  2435.    DS:SI <-- ptr to source string
  2436.    ES:DI <-- ptr to result string
  2437.  
  2438. Description:
  2439.  
  2440. The S0_RIGHT service copies a specified number of characters from the right
  2441. of one string into another.  If you prefer, you can use the same address for
  2442. both strings, allowing you to place the result back into the source buffer.
  2443.  
  2444. Strings must be in ASCIIZ form (NUL terminated).
  2445.  
  2446.  
  2447.  
  2448.  
  2449. Service : S0_TRIM
  2450.  
  2451. Module  : String Services
  2452.  
  2453. Compat  : Any
  2454.  
  2455. Purpose : Trims the white space from either side of a string
  2456.  
  2457. Parms:
  2458.       AL <-- trim code: set bit 0 for left, bit 1 for right
  2459.    DS:SI <-- ptr to source string
  2460.    ES:DI <-- ptr to result string
  2461.  
  2462. Description:
  2463.  
  2464. The S0_TRIM service removes the "white space" from either side (or both
  2465. sides) of a string.  Blanks and control characters are considered white
  2466. space.  This is a handy routine for normalizing user input and trimming the
  2467. padding from fixed-length records, for instance.
  2468.  
  2469. If you prefer, you can use the same address for both strings, allowing you to
  2470. place the result back into the source buffer.
  2471.  
  2472. Strings must be in ASCIIZ form (NUL terminated).
  2473.  
  2474. Service : S0_UPCASE
  2475.  
  2476. Module  : String Services
  2477.  
  2478. Compat  : Any
  2479.  
  2480. Purpose : Converts a string to uppercase
  2481.  
  2482. Parms:
  2483.    DS:SI <-- ptr to source string
  2484.    ES:DI <-- ptr to result string
  2485.  
  2486. Description:
  2487.  
  2488. The S0_UPCASE service converts all of the alphabetic characters in a string
  2489. to uppercase.  As well as American alphabet characters, the international
  2490. alphabet characters supplied in the upper 128 IBM ASCII set are also
  2491. translated.
  2492.  
  2493. If you prefer, you can use the same address for both strings, allowing you to
  2494. place the result back into the source buffer.
  2495.  
  2496. Strings must be in ASCIIZ form (NUL terminated).
  2497.  
  2498. Service : TC_CHKSUM
  2499.  
  2500. Module  : Telecommunications Services
  2501.  
  2502. Compat  : Any
  2503.  
  2504. Purpose : Calculates a checksum for Xmodem or Ymodem
  2505.  
  2506. Parms:
  2507.    DS:SI <-- ptr to data block
  2508.       CX <-- length of data block (bytes)
  2509.    -------
  2510.       AX = checksum
  2511.  
  2512. Description:
  2513.  
  2514. The TC_CHKSUM routine calculates the checksum of a block of data.  The
  2515. algorithm used is compatible with the Xmodem and Ymodem file transfer
  2516. protocols (use the lower byte of the checksum, AL, in that case).
  2517.  
  2518.  
  2519.  
  2520.  
  2521. Service : TC_CRC
  2522.  
  2523. Module  : Telecommunications Services
  2524.  
  2525. Compat  : Any
  2526.  
  2527. Purpose : Calculates a CRC for Xmodem or Ymodem
  2528.  
  2529. Parms:
  2530.    DS:SI <-- ptr to data block
  2531.       CX <-- length of data block (bytes)
  2532.    -------
  2533.       AX = CRC
  2534.  
  2535. Description:
  2536.  
  2537. The TC_CRC routine calculates the CRC (Cyclical Redundancy Check) value of a
  2538. block of data.  The algorithm used is compatible with the Xmodem and Ymodem
  2539. file transfer protocols.
  2540.  
  2541. If you use TC_CRC for an outgoing Xmodem/Ymodem block, you need to add two
  2542. nulls to the end of the block and increment CX accordingly.  When you get the
  2543. CRC, exchange AL and AH, then put AX where the nulls were, which will
  2544. complete the outgoing packet.  The reason for the swap is that Xmodem/Ymodem
  2545. expect the CRC with the high byte followed by the low byte (non-Intel format).
  2546.  
  2547. If you use TC_CRC for an incoming Xmodem/Ymodem block, leave the received CRC
  2548. at the end of the data block and increment CX accordingly.  If the calculated
  2549. CRC comes out to zero, the received packet is fine.
  2550.  
  2551. Service : TD_GETDATE
  2552.  
  2553. Module  : Time and Date Services
  2554.  
  2555. Compat  : DOS
  2556.  
  2557. Purpose : Returns the date as a formatted string
  2558.  
  2559. Parms:
  2560.       AL <-- 0 for 2-digit year, 1 for 4-digit year
  2561.    DS:DX <-- ptr to result buffer (minimum 11 bytes)
  2562.  
  2563. Description:
  2564.  
  2565. The TD_GETDATE service returns the current date as a formatted string.  The
  2566. formatting includes international date handling, in that the string is
  2567. formatted in the appropriate manner for the country in which the computer is
  2568. being operated.  If a DOS version before 3.0 is used, the date delimiters are
  2569. not guaranteed to be correct, but the month, day and year will be in the
  2570. proper order regardless.
  2571.  
  2572. The result is returned as an ASCIIZ (NUL terminated) string.
  2573.  
  2574.  
  2575.  
  2576.  
  2577. Service : TD_GETTIME
  2578.  
  2579. Module  : Time and Date Services
  2580.  
  2581. Compat  : DOS
  2582.  
  2583. Purpose : Returns the time as a formatted string
  2584.  
  2585. Parms:
  2586.    DS:DX <-- ptr to result buffer (minimum 8 bytes)
  2587.  
  2588. Description:
  2589.  
  2590. The TD_GETTIME service returns the current time as a formatted string.  The
  2591. formatting includes international time handling, in that the string is
  2592. formatted in the appropriate manner for the country in which the computer is
  2593. being operated.  If a DOS version before 3.0 is used, the time delimiters and
  2594. 12/24-hour formatting are not guaranteed to be correct.
  2595.  
  2596. If the hour is a single-digit number, it will be preceeded by a space.  This
  2597. is handy for keeping times in columns, but if you don't want the space there,
  2598. chop it off by calling the S0_TRIM service.
  2599.  
  2600. The result is returned as an ASCIIZ (NUL terminated) string.
  2601.